package br.com.sgc.entities.geral;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;



@Entity
@Table(name="unidades_medida", schema="geral")
public class UnidadeMedida implements Serializable {
	
	private static final long serialVersionUID = -7239289499605460531L;

	@Id 
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_UNIDADE")
	@SequenceGenerator(schema = "geral", initialValue = 1, name = "SEQ_UNIDADE", sequenceName = "geral.seq_unidade", allocationSize = 1)
	private Long id;
	
	private String nome;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "clinica_id", referencedColumnName = "id")
	private Clinica clinica;
	
	private  Boolean isDeletado;

	
	
	//----------------------------------------------------------Gets e Setters----------------------------------------------------------
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getNome() {
		return nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	public Boolean getIsDeletado() {
		return isDeletado;
	}

	public void setIsDeletado(Boolean isDeletado) {
		this.isDeletado = isDeletado;
	}

	public Clinica getClinica() {
		return clinica;
	}

	public void setClinica(Clinica clinica) {
		this.clinica = clinica;
	}
	

	
}
